import {localeProps} from '../../utils';

const label = '选项卡';
const name = 'jd-tab';

export default {
    icon: 'icon-tab',
    label,
    name,
    children: 'jd-tab-pane',
    mask: false,
    rule() {
        return {
            type: 'el-tabs',
            style: 'width:100%;',
            props: {type: ''},
            children: []
        };
    },
    props(_, {t}) {
        return localeProps(t, name + '.props', [{
            type: 'select',
            field: 'type',
            title: '风格类型',
            options: [{label: '默认样式',value: ''}, {label: '无框卡片',value: 'card'}, {label: '边框卡片', value: 'border-card'}]
        }, {type: 'switch', field: 'closable', title: '标签可关闭'}, {
            type: 'select',
            field: 'tabPosition',
            title: '显示位置',
            options: [{label: '上边', value: 'top'}, {label: '左边',value: 'left'}, {label: '右边', value: 'right'}]
        }, {type: 'switch', field: 'stretch', title: '标签平铺'}]);
    }
};
